<!-- 提示信息 -->
<app-tip [type]="tipType"></app-tip>

<!-- 遮罩 -->
<app-load *ngIf="isLoading"></app-load>
<div class="table-main">
  <div class="header">
    <div class="left flex" [routerLink]="['/main']"  id="btn-back">
      <div class="left-icon">
        <i class="fa fa-angle-left back-icon" aria-hidden="true"></i>
      </div>
      <div class="left-name">
        <span class="back-name">返回</span>
      </div>
    </div>
    <div class="center">添加预定</div>
  </div>
  <app-table-nav [navName]="'reserve'"></app-table-nav>

  <div class="group-list">
    <div class="group-item"><div class="left" style="width: 6.5em;"><span>预约姓名</span></div><div class="right">
      <input type="text" class="c-select" [(ngModel)]="submitData['book.name']" placeholder="请输入姓名"></div></div>
    <div class="group-item"><div class="left" style="width: 6.5em;"><span>预约电话</span></div><div class="right">
      <input type="text" class="c-select" [(ngModel)]="submitData['book.mobile']" placeholder="请输入手机号"></div></div>
  </div>

  <div class="group-list">
    <div class="group-item">
      <div class="left" style="flex: 1">
        <span style="position: absolute"><i class="fa fa-calendar-plus-o" aria-hidden="true" style="font-size: 1.2em;color: #f39801;margin-top: 12px;"></i></span>
        <span>预约日期</span>
      </div>
      <div class="right">
        <span style="position: absolute"><i class="fa fa-clock-o" aria-hidden="true" style="font-size: 1.5em;color: #f39801;margin-top: 12px;"></i></span>
        <span>预约时间</span>
      </div>
    </div>

    <div class="group-item" style="padding-bottom:.5em;">
      <div class="left" style="flex: 1">
        <input type="date" style="border: 1px solid #f5f5f5;outline: none;background: transparent;height: 2em;width: 80%" [(ngModel)]="submitData['start_date']" placeholder="请选择日期">
      </div>
      <div class="right" style="flex: 1;">
        <input type="time" style="border: 1px solid #f5f5f5;outline: none;background: transparent;height: 2em;width: 80%" [(ngModel)]="submitData['start_time']"placeholder="请选择时间">
      </div>
    </div>
  </div>
  <div class="group-list">
    <div class="group-item">
      <div class="left">
        <span>用餐人数</span>
      </div>
      <div class="right">
        <input type="text" class="c-select" [(ngModel)]="submitData['book.people_num']" placeholder="请输入用餐人数" style="padding-left: 1em;">
      </div>
    </div>
  </div>
  <div class="group-list">
    <div class="group-item">
      <div class="left" style="width: 6em;">
        <span>预定桌号</span>
      </div>
      <div class="right">
        <select name="" id=""  class="c-input" style="height: 2.5em;line-height: 2.5" [(ngModel)]="submitData['book.tid']">
          <optgroup>
            <option value="">请选择</option>
          </optgroup>
          <optgroup *ngFor="let v of tableList" [label]="v.name">
            <option [value]="v1.id" *ngFor="let v1 of v.tableList">{{v1.name}}</option>
          </optgroup>
        </select>
      </div>
    </div>
  </div>
  <div class="group-list" style="height: 5em">
    <div class="group-item">
      <textarea style="border: none;resize: none;height: 4.5em;line-height:2em;width: 100%;outline: none" placeholder="请输入补充说明的内容..." [(ngModel)]="submitData['book.content']"></textarea>
    </div>
  </div>
  <div style="padding: 0 1em;margin-top: 1em;" (click)="onSubmit()" *ngIf="submitType"><div class="btn-submit">提交</div></div>
</div>
